While at it, change the style of other two occurrences.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
part_payload_out = (GMemoryOutputStream*)g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
part_payload_compressor = (GConverterOutputStream*)g_converter_output_stream_new ((GOutputStream*)part_payload_out, compressor);
- if (0 > g_output_stream_splice ((GOutputStream*)part_payload_compressor, part_payload_in,
- G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET | G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE,
- cancellable, error))
- goto out;
+ {
+ gssize n_bytes_written = g_output_stream_splice ((GOutputStream*)part_payload_compressor, part_payload_in,
+ G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET | G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE,
+ cancellable, error);
+ if (n_bytes_written < 0)
+ goto out;
+ }
/* FIXME - avoid duplicating memory here */
delta_part = g_variant_new ("(y@ay)",
gs_unref_object GMemoryOutputStream *memout = (GMemoryOutputStream*)g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
gs_unref_object GInputStream *convin = g_converter_input_stream_new ((GInputStream*)memin, converter);
- if (0 > g_output_stream_splice ((GOutputStream*)memout, convin,
- G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE |
- G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
- cancellable, error))
- goto out;
+ {
+ gssize n_bytes_written = g_output_stream_splice ((GOutputStream*)memout, convin,
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE |
+ G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
+ cancellable, error);
+ if (n_bytes_written < 0)
+ goto out;
+ }
ret = TRUE;
*out_uncompressed = g_memory_output_stream_steal_as_bytes (memout);
if (!in)
goto out;
- if (!g_output_stream_splice (stdout_stream, in, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE,
- cancellable, error))
- goto out;
+ {
+ gssize n_bytes_written = g_output_stream_splice (stdout_stream, in, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE,
+ cancellable, error);
+ if (n_bytes_written < 0)
+ goto out;
+ }
ret = TRUE;
out: